ports: Avoid using two separate directories for port packages
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-08-08 17:43:27 +02:00
parent 919c71ff85
commit 16590dbb02
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 2 additions and 11 deletions

1
.gitignore vendored
View File

@ -8,5 +8,4 @@ base/usr/**
.fakeroot .fakeroot
kernel/config.cmake kernel/config.cmake
ports/out/ ports/out/
ports/local/
ports/temp/ ports/temp/

View File

@ -15,11 +15,6 @@ fi
source ports/$PORT_NAME/PACKAGE source ports/$PORT_NAME/PACKAGE
if [ -f ports/local/$name-$version.tar.gz ]; then
echo "Package $PORT_NAME is already installed and up to date!"
exit 1
fi
if ! [ -f ports/out/$name-$version.tar.gz ]; then if ! [ -f ports/out/$name-$version.tar.gz ]; then
tools/make-package.sh $PORT_NAME tools/make-package.sh $PORT_NAME
fi fi
@ -28,19 +23,17 @@ PORT_FILES=$LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files
if [ -f $PORT_FILES ] if [ -f $PORT_FILES ]
then then
echo "Package $PORT_NAME is installed, but is an outdated version. Updating." echo "Package $PORT_NAME is already installed! Updating."
tools/uninstall-package.sh $PORT_NAME tools/uninstall-package.sh $PORT_NAME
fi fi
cp ports/out/$name-$version.tar.gz ports/local/
mkdir -p $LUNA_BASE/usr/share/pkgdb/ mkdir -p $LUNA_BASE/usr/share/pkgdb/
cd $LUNA_BASE cd $LUNA_BASE
find -type f | sed 's|^./||' > /tmp/before.list find -type f | sed 's|^./||' > /tmp/before.list
tar -C $LUNA_BASE -xf $LUNA_ROOT/ports/local/$name-$version.tar.gz tar -C $LUNA_BASE -xf $LUNA_ROOT/ports/out/$name-$version.tar.gz
find -type f | sed 's|^./||' > /tmp/after.list find -type f | sed 's|^./||' > /tmp/after.list

View File

@ -16,4 +16,3 @@ fi
rm -v $(cat $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files) rm -v $(cat $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files)
rm -v $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files rm -v $LUNA_BASE/usr/share/pkgdb/$PORT_NAME.files
rm -v $LUNA_ROOT/ports/local/$PORT_NAME-*.tar.gz