diff --git a/bin/xbps-src/main.sh b/bin/xbps-src/main.sh index a187a0de13..8f1a578aee 100755 --- a/bin/xbps-src/main.sh +++ b/bin/xbps-src/main.sh @@ -100,9 +100,9 @@ set_defvars() : ${XBPS_TEMPLATESDIR:=$XBPS_DISTRIBUTIONDIR/templates} : ${XBPS_HELPERSDIR:=$XBPS_TEMPLATESDIR/helpers} - : ${XBPS_CACHEDIR:=$XBPS_MASTERDIR/var/cache/xbps} - : ${XBPS_META_PATH:=$XBPS_CACHEDIR/} - : ${XBPS_PKGMETADIR:=$XBPS_CACHEDIR/metadata} + : ${XBPS_DBDIR:=$XBPS_MASTERDIR/var/db/xbps} + : ${XBPS_META_PATH:=$XBPS_DBDIR/} + : ${XBPS_PKGMETADIR:=$XBPS_DBDIR/metadata} : ${XBPS_SHUTILSDIR:=$XBPS_DISTRIBUTIONDIR/shutils} local DDIRS="XBPS_TEMPLATESDIR XBPS_HELPERSDIR XBPS_SHUTILSDIR" diff --git a/doc/BINPKG_INFO b/doc/BINPKG_INFO index feda063540..e507d05fb6 100644 --- a/doc/BINPKG_INFO +++ b/doc/BINPKG_INFO @@ -10,13 +10,13 @@ with bzip2 and has the following structure: /var ------| => Package structure that will be installed. /etc ------| ... - /var/cache/xbps/metadata/$pkgname - /var/cache/xbps/metadata/$pkgname/flist - /var/cache/xbps/metadata/$pkgname/props.plist - /var/cache/xbps/metadata/$pkgname/prepost-inst - /var/cache/xbps/metadata/$pkgname/prepost-rm + /var/db/xbps/metadata/$pkgname + /var/db/xbps/metadata/$pkgname/flist + /var/db/xbps/metadata/$pkgname/props.plist + /var/db/xbps/metadata/$pkgname/prepost-inst + /var/db/xbps/metadata/$pkgname/prepost-rm -Metadata info is stored in the "/var/cache/xbps/metadata/$pkgname" +Metadata info is stored in the "/var/db/xbps/metadata/$pkgname" directory and two files will be always be present: flist and props.plist. The flist file contains the list of files that the package will @@ -87,7 +87,7 @@ index, add the repository into the pool and install the binary package. Please note that by default, the xbps-* utils accept the -r flag, to specify the root directory for all operations, in that case the package will be -installed into and metadata files into /var/cache/xbps. +installed into and metadata files into /var/db/xbps. Don't forget to set this flag if you aren't using xbps as the primary package manager in your system, otherwise it could overwrite some files! diff --git a/doc/BINPKG_REPOSITORY b/doc/BINPKG_REPOSITORY index 2049295fa3..6f8f3eea94 100644 --- a/doc/BINPKG_REPOSITORY +++ b/doc/BINPKG_REPOSITORY @@ -19,7 +19,7 @@ main dictionary to specify more info, like: a remote location specified with "location-remote". The package dictionary will be the same than the one available in -package's metadata directory "/var/cache/xbps/metadata/$pkgname/props.plist", +package's metadata directory "/var/db/xbps/metadata/$pkgname/props.plist", but some additional objects are added to provide enough info for the repository itself: diff --git a/include/xbps_api.h b/include/xbps_api.h index beb597ea77..a4c16f29ec 100644 --- a/include/xbps_api.h +++ b/include/xbps_api.h @@ -36,7 +36,7 @@ #include /* Default root PATH for xbps to store metadata info. */ -#define XBPS_META_PATH "/var/cache/xbps" +#define XBPS_META_PATH "/var/db/xbps" /* Filename for the repositories plist file. */ #define XBPS_REPOLIST "repositories.plist" @@ -47,12 +47,6 @@ /* Filename of the packages register. */ #define XBPS_REGPKGDB "regpkgdb.plist" -#define XBPS_PKG_ENOTINREPO -1 /* Not found in repo */ -#define XBPS_PKG_EEXIST -2 /* Already installed */ -#define XBPS_PKG_EINDEPS -3 /* Check deps failed */ -#define XBPS_PKG_ECHDIRDEST -4 /* chdir() to dest failed */ -#define XBPS_PKG_EEMPTY -5 /* empty pkg list */ - #include "cmpver.h" #include "fexec.h" #include "humanize_number.h" diff --git a/shutils/binpkg-genindex.sh b/shutils/binpkg-genindex.sh index 0d50905332..223f65371e 100644 --- a/shutils/binpkg-genindex.sh +++ b/shutils/binpkg-genindex.sh @@ -61,7 +61,7 @@ write_repo_pkgindex() # for i in $(echo $repodir/*.xbps); do pkgname="$(basename ${i%%-[0-9]*.*.$xbps_machine.xbps})" - propsf="./var/cache/xbps/metadata/$pkgname/props.plist" + propsf="./var/db/xbps/metadata/$pkgname/props.plist" cd $tmppkgdir && tar xfjp $i $propsf if [ $? -ne 0 ]; then msg_warn "Couldn't extract $(basename $i) metadata!" diff --git a/shutils/binpkg.sh b/shutils/binpkg.sh index 1ef724e35f..7be3adc5fa 100644 --- a/shutils/binpkg.sh +++ b/shutils/binpkg.sh @@ -30,7 +30,7 @@ xbps_write_metadata_pkg() { local destdir=$XBPS_DESTDIR/$pkgname-$version - local metadir=$destdir/var/cache/xbps/metadata/$pkgname + local metadir=$destdir/var/db/xbps/metadata/$pkgname local prioinst= if [ ! -d "$destdir" ]; then