Ubuntu Pastebin

Paste from adconrad at Fri, 31 Mar 2017 11:32:30 +0000

Download as text
  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
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
diff -Nru live-build-3.0~a57/debian/changelog live-build-3.0~a57/debian/changelog
--- live-build-3.0~a57/debian/changelog	2017-02-28 22:21:28.000000000 -0700
+++ live-build-3.0~a57/debian/changelog	2017-03-31 05:30:01.000000000 -0600
@@ -1,3 +1,10 @@
+live-build (3.0~a57-1ubuntu25.3) xenial; urgency=medium
+
+  * ubuntu-debootstrap-demotions.patch: Hardcode the removals instead of
+    trying to play fancy games with detection of demotions (LP: #1678042)
+
+ -- Adam Conrad <adconrad@ubuntu.com>  Fri, 31 Mar 2017 05:30:01 -0600
+
 live-build (3.0~a57-1ubuntu25.2) xenial; urgency=medium
 
   * debian/patches/ubuntu-debootstrap-demotions.patch: remove packages
diff -Nru live-build-3.0~a57/debian/patches/series live-build-3.0~a57/debian/patches/series
--- live-build-3.0~a57/debian/patches/series	2017-02-28 22:21:14.000000000 -0700
+++ live-build-3.0~a57/debian/patches/series	2017-03-31 05:30:01.000000000 -0600
@@ -32,4 +32,5 @@
 upstart-not-in-bootstrap
 ubuntu-s390x-support.patch
 ubuntu-initramfs-compression-symlinks.patch
+#ubuntu-debootstrap-demotions.patch
 ubuntu-debootstrap-demotions.patch
diff -Nru live-build-3.0~a57/debian/patches/ubuntu-debootstrap-demotions.patch live-build-3.0~a57/debian/patches/ubuntu-debootstrap-demotions.patch
--- live-build-3.0~a57/debian/patches/ubuntu-debootstrap-demotions.patch	2017-02-28 22:21:14.000000000 -0700
+++ live-build-3.0~a57/debian/patches/ubuntu-debootstrap-demotions.patch	2017-03-31 05:30:01.000000000 -0600
@@ -1,72 +1,17 @@
-Author: Steve Langasek <steve.langasek@ubuntu.com>
-Description: remove packages after bootstrap that have been demoted
- If we are doing a minimal bootstrap, we only want packages that are
- Priority: required.  Sometimes we may want to downgrade a package from
- required post-release; in this case it will still be installed by
- debootstrap, but we would want to remove it post-bootstrap.  This patch
- implements handling of this for any packages which have been downgraded
- and removed without removing other installed packages.
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1668847
+Description: Remove locales after debootstrap
+Author: Adam Conrad <adconrad@ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1678042
+Last-Update: 2017-03-31
 
-Index: live-build-3.0~a57/scripts/build/lb_chroot_archives
-===================================================================
---- live-build-3.0~a57.orig/scripts/build/lb_chroot_archives
-+++ live-build-3.0~a57/scripts/build/lb_chroot_archives
-@@ -23,6 +23,45 @@
+--- live-build-3.0~a57.orig/scripts/build/lb_bootstrap_debootstrap
++++ live-build-3.0~a57/scripts/build/lb_bootstrap_debootstrap
+@@ -169,6 +169,9 @@ then
+ 	# Removing bootstrap cache
+ 	rm -f chroot/var/cache/apt/archives/*.deb
  
- Arguments "${@}"
- 
-+# remove all installed packages that are Prio: required in the release
-+# pocket but something else in the latest version
-+remove_demoted_packages() {
-+	requireds=$(
-+		Chroot chroot dpkg -l | awk '/^ii/ { print $2 " " $3 }' \
-+		| while read pkg ver
-+		do
-+			prio=$(Chroot chroot apt-cache show "$pkg=$ver" \
-+			       | awk '/^Priority: / { print $2 }')
-+			if [ "$prio" = required ]; then
-+				echo "$pkg"
-+			fi
-+		done
-+	)
-+	for pkg in $requireds; do
-+		prio=$(Chroot chroot apt-cache show $pkg \
-+		       | awk '/^Priority:/ { print $2 }' | sort -u)
-+		if [ "$prio" != required ]; then
-+			removals="$removals${removals:+ }$pkg"
-+		fi
-+	done
-+
-+	while true; do
-+		for pkg in $removals; do
-+			count=$(Chroot chroot apt-get -s remove $pkg \
-+			        | grep -c ^Remv)
-+			if [ "$count" -eq 1 ]; then
-+				Chroot chroot apt-get -y remove --purge $pkg
-+			else
-+				new_removals="$new_removals${new_removals:+ }$pkg"
-+			fi
-+		done
-+		if [ "$new_removals" = "$removals" ]; then
-+			break
-+		fi
-+		removals="$new_removals"
-+	done
-+}
-+
- # Reading configuration files
- Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
- Set_defaults
-@@ -463,6 +502,11 @@
- 			>> chroot/root/packages.chroot
- 		fi
- 
-+		if [ "$LB_BOOTSTRAP_FLAVOUR" = minimal ]; then
-+			Apt chroot update
-+			remove_demoted_packages
-+		fi
++	# Remove demoted packages
++	Chroot chroot dpkg --purge locales
 +
- 		# Update indices from cache
- 		if [ "${LB_CACHE_INDICES}" = "true" ] && [ -d cache/indices.bootstrap ]
- 		then
+ 	# Creating stage file
+ 	Create_stagefile .build/bootstrap
+ else
Download as text