forked from openSUSE/obs-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-pkg-arch
62 lines (52 loc) · 1.83 KB
/
build-pkg-arch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
# Arch specific functions.
#
# (C) 2014 SUSE, Inc
#
pkg_initdb_arch() {
mkdir -p $BUILD_ROOT/var/lib/pacman/sync
touch $BUILD_ROOT/var/lib/pacman/sync/core.db
touch $BUILD_ROOT/var/lib/pacman/sync/extra.db
touch $BUILD_ROOT/var/lib/pacman/sync/community.db
}
pkg_get_installed_arch() {
:
}
pkg_set_packageid_arch() {
PKGID=`readlink $BUILD_ROOT/.init_b_cache/rpms/$PKG.$PSUF`
PKGID="${PKGID##*/}"
PKGID="${PKGID/%.pkg.tar.?z/.arch}"
PKGID="${PKGID%.arch} arch"
}
pkg_erase_arch() {
cleanup_and_exit 1
}
pkg_verify_installed_arch() {
return 1
}
pkg_cumulate_arch() {
return 1
}
pkg_install_arch() {
# -d -d disables deps checking
( chroot $BUILD_ROOT pacman -U --force -d -d --noconfirm .init_b_cache/$PKG.$PSUF 2>&1 || touch $BUILD_ROOT/exit ) | \
perl -ne '$|=1;/^(warning: could not get filesystem information for |loading packages|looking for inter-conflicts|Targets |Total Installed Size: |Net Upgrade Size: |Proceed with installation|checking package integrity|loading package files|checking for file conflicts|checking keyring|Packages \(\d+\):|:: Proceed with installation|checking available disk space|installing |upgrading |warning:.*is up to date -- reinstalling|Optional dependencies for| )/||/^$/||print'
}
pkg_finalize_arch() {
:
}
pkg_preinstall_arch() {
$TAR -f "$BUILD_ROOT/.init_b_cache/rpms/$PKG.arch"
if test -f .INSTALL ; then
cat .INSTALL > ".init_b_cache/scripts/$PKG.post"
echo 'type post_install >/dev/null 2>&1 && post_install' >> ".init_b_cache/scripts/$PKG.post"
fi
rm -f .PKGINFO .INSTALL
}
pkg_runscripts_arch() {
if test -e "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post" ; then
echo "running $PKG postinstall script"
chroot $BUILD_ROOT ".init_b_cache/scripts/$PKG.post" < /dev/null
rm -f "$BUILD_ROOT/.init_b_cache/scripts/$PKG.post"
fi
}