How to define conflicts in the +MANIFEST

Aperta
#772 17 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
shell
Ambito
tooling

Direzione di ricerca

Riproduci il workflow del pacchetto da +MANIFEST usando pkg create -o . -r pilight -m pilight, quindi compila il repository con pkg repo .. Inizia esaminando come viene interpretata la voce conflicts durante l'installazione e verifica che un pacchetto sia in conflitto con una versione installata di wget. Il lavoro è completato quando la sintassi del manifest è documentata e il conflitto viene fatto rispettare.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I'm trying to create my own pkg repository for my pilight project. It almost works. What is did was:

  1. The structure in the pilight source folder is as follows:
repository/pilight
repository/pilight/etc
repository/pilight/etc/pilight
repository/pilight/usr
repository/pilight/usr/local
repository/pilight/usr/local/share
repository/pilight/usr/local/share/pilight
repository/pilight/usr/local/share/pilight/default
repository/pilight/usr/local/sbin
repository/pilight/usr/local/lib
repository/pilight/usr/local/lib/pilight
  1. I also added three files in this pilight source folder:
repository/pilight/+MANIFEST
repository/pilight/pkg-deinstall
repository/pilight/pkg-install

Here are the contents of these files so you can check if i made any mistakes or not? There is not much documentation on how to create a package manually, so maybe i overlooked things.

The content of the +MANIFEST:

name: pilight
version: 3.0
origin: utilities/pilight
comment: pilight
prefix: /
arch: freebsd:10:x86:64
www: http://www.pilight.org
maintainer: CurlyMo <[email protected]>
licenselogic: single
licenses: ["GPLv3"]
flatsize: 0
desc: |-
  Contol RF devices with you Raspberry Pi
deps:
  lzlib: {origin: archivers/lzlib, version: 1.5}
categories: utilities
directories:
  /etc/pilight: "y"
  /usr/local/share/pilight: "y"
  /usr/local/share/pilight/default: "y"
  /usr/local/lib/pilight: "y"
files:
  /etc/pilight/hardware.json-default: '0a4a0a5ccded284c2b899b4d57f87377612e5a2eafbf3f80f0d152a38dac1633'
  /etc/pilight/settings.json-default: '452b2199d126d0804e7d5e21178dc563111da784ddae1dac7749b207f4f22076'
  /usr/local/share/pilight/default/pilight.css: '480c0c32f7cd7b430aae8f107b2e73d5eb9d87c2efac083d01068bf97a05ac51'
  /usr/local/share/pilight/default/battery_red.png: '5d4430cb8b1b09d9bcbbdbc3ee0eb418c1ba8b1955be4cde366ce2e7543863c3'
  /usr/local/share/pilight/default/ajax-loader.gif: '8cb004408004ae93cf665c75d197ddfdf514abcc65c6e38092ed40cc49386a23'
  /usr/local/share/pilight/default/apple-touch-icon-iphone-retina-display-hr.png: '630cddf4c90adb02963fdccead99509ea0a9794b40bac7a4155e524be3cb4a62'
  /usr/local/share/pilight/default/apple-touch-icon-iphone.png: 'a5b208a6c8474919940598620a43fbabbd768b41495e4b9f99a45e3a2a33670d'
  /usr/local/share/pilight/default/manifest.appcache: '8ea289b3b42c9ee8b2a968e82d36387cf0bf03364d885d1d51cfadb902303c24'
  /usr/local/share/pilight/default/apple-touch-icon-ipad.png: '096b10bcb2d0e1068ff68ff46d3faeced4cae1b688559a405074dcee58af9e8c'
  /usr/local/share/pilight/default/jquery.mobile-1.3.2.min.js: '3c2b2b933b5cc8ba8b44486172285989e812a059c0cddeb9bc127d1e30cf8924'
  /usr/local/share/pilight/default/index.html: '761ae399a1126a0b0e0929450d43eda3ce0762f165af97e497f8af5e17d53753'
  /usr/local/share/pilight/default/battery_green.png: 'eeb2f42e51826cb53a261f6e41ff8d5b72f49e0f87d449fda2d530ddd14b09f5'
  /usr/local/share/pilight/default/jquery.mobile-1.3.2.min.css: 'c6eb25dd3f85b83036d6a0d28b925c69c7db0c7d68d0760a9b44ce939cc50e71'
  /usr/local/share/pilight/default/logo.png: '47c5a66ace28d3ac97bdc83e098e51295ae46c51d57c6b1ce79551a6d1e7d782'
  /usr/local/share/pilight/default/jquery-2.0.2.min.js: '4d9586a075f082a04fd40178499c472012b351db4c1a4d210907a0891f7d8ad9'
  /usr/local/share/pilight/default/favicon.ico: 'a951b4d393cec418d75debb92e77b303e5a8ec28b518c5782edcbf8abaa33d82'
  /usr/local/share/pilight/default/apple-touch-icon-iphone-retina-display.png: '9bd0fdc5049972b21bab91cd4925ad8d975da70883c2ea248a660a5c5bb31a6e'
  /usr/local/share/pilight/default/pilight.js: '9eb47fe87580a9f86d15c8236111ad770f344bcc4dca6719359188e1b134526a'
  /usr/local/sbin/pilight-daemon: 'e71ab3333c6f9f76ca8f8834d4d050ffe20d97210b984b4412d8354ecb4ad9a1'
  /usr/local/sbin/pilight-uuid: '3e478fdd609aa8f9d985d7fb5a81c1c75159408eb331b4341af64d5667a6bea4'
  /usr/local/sbin/pilight-control: '35caa13a594b5253b80c9dfdac408c9956b5b90ee3a3a1752bc7e889a2929cc6'
  /usr/local/sbin/pilight-receive: '0a6300b436b5f9ff914e36cfcec25584f6051a4a0d48b482082dc4ae22fa7a3b'
  /usr/local/sbin/pilight-debug: '40d4f85ccc7a444b76ab2940739d32b39f417b73764d7c5982939f07bda76396'
  /usr/local/sbin/pilight-raw: '49fb3f92f34469945715e9ce49f09917b177f2bde51602fe4173499034105e7d'
  /usr/local/sbin/pilight-send: 'b0e4a30e97adb525590cd0beef9e1e235a1d792ddfab862d5f4f8c6336c529b8'
  /usr/local/sbin/pilight-learn: 'e74490d64ec1c7553fda58a430730798f91054d44a07b76aa8e09909b7ab088e'
  /usr/local/lib/pilight/libpilight.a: '68f02472ece1a9435c1e1f8043a73260e8b8c6cea154ed62ce8b85e6d3bf3ccc'
  /usr/local/lib/pilight/libpilight.so.3.0: '01da3d96ed72b5b2869d4e631d2e4aa3a44fd62707a22c00a92e605a40f10ee8'
  /usr/local/lib/libpilight.so: '-' 

The directories and files list is automatically generated by my scripts

The content of the pkg-install:

#!/bin/sh

if [ $2 == "PRE-INSTALL" ]; then
    true
fi

if [ $2 == "POST-INSTALL" ]; then
cat << \EOF > /etc/pilight/hardware.json
{
    "none": { }
}
EOF

cat << \EOF > /etc/pilight/settings.json
{
    "log-level": 4,
    "pid-file": "/var/run/pilight.pid",
    "config-file": "",
    "hardware-file": "/etc/pilight/hardware.json",
    "log-file": "/var/log/pilight.log",
    "send-repeats": 10,
    "receive-repeats": 1,
    "webserver-enable": 1,
    "webserver-root": "/usr/local/share/pilight/",
    "webserver-port": 5001,
    "webserver-cache": 1,
    "webserver-authentication": 0,
    "webserver-username": "",
    "webserver-password": "",
    "whitelist": "",
    "update-check": 1
}
EOF
fi

The content of my pkg-deinstall:

#!/bin/sh

if [ $2 == "DEINSTALL" ]; then
    true
fi

if [ $2 == "POST-DEINSTALL" ]; then
    [ -d /etc/pilight ] && rm -r /etc/pilight 1>/dev/null 2>/dev/null &>/dev/null || true
fi

The package itself is generated by doing the following in the repository folder

pkg create -o . -r pilight -m pilight

And i generate the repo like this:

pkg repo .

This all works fine. I can install and remove the pilight package without issues. However, i also want to add some conflicts. The sparse documentation on this tells me that it should be defined like this in the +MANIFEST:

conflicts: [wget-*]

However, nothing i try works. When i install the pilight package it just doesn't care if i already have wget installed or not.

So, how do you define these conflicts?

Lingua principale
C
Stelle
835
Fork
313
Merge medio
3g 7h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di freebsd/pkg

Tutte le issue di freebsd/pkg

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.