command-not-found: don't recommend extra repositories

This commit is contained in:
Ruben Rodriguez 2023-06-09 17:04:52 -04:00
parent 198995bcdb
commit 0cf2c7a7c8
2 changed files with 29 additions and 2 deletions

View file

@ -0,0 +1,24 @@
diff -ru source.orig/CommandNotFound/CommandNotFound.py source/CommandNotFound/CommandNotFound.py
--- source.orig/CommandNotFound/CommandNotFound.py 2021-12-08 05:53:19.000000000 -0500
+++ source/CommandNotFound/CommandNotFound.py 2023-06-09 16:52:12.675354733 -0400
@@ -227,8 +227,6 @@
else:
print("apt install %s" % packages[0][0], file=self.output_fd)
print(_("Please ask your administrator."))
- if not packages[0][2] in self.sources_list:
- print(_("You will have to enable the component called '%s'") % packages[0][2], file=self.output_fd)
self.output_fd.flush()
def sudo(self):
@@ -246,10 +244,7 @@
ver = " # version %s, or" % (package[1])
else:
ver = " # version %s" % (package[1])
- if package[2] in self.sources_list:
- print("%sapt install %-*s%s" % (self.sudo(), pad, package[0], ver), file=self.output_fd)
- else:
- print("%sapt install %-*s%s" % (self.sudo(), pad, package[0], ver) + " (" + _("You will have to enable component called '%s'") % package[2] + ")", file=self.output_fd)
+ print("%sapt install %-*s%s" % (self.sudo(), pad, package[0], ver), file=self.output_fd)
if self.euid != 0 and not self.user_can_sudo:
print(_("Ask your administrator to install one of them."), file=self.output_fd)
self.output_fd.flush()

View file

@ -19,7 +19,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
VERSION=2 VERSION=3
. ./config . ./config
@ -45,9 +45,12 @@ sed -i '/snapd/d' debian/control
#Remove update-from-web #Remove update-from-web
rm update-from-web.sh rm update-from-web.sh
#Patch test #Patch the test suite
patch -p1 < $DATA/fix_test.patch patch -p1 < $DATA/fix_test.patch
#Do not recommend extra repositories
patch -p1 < $DATA/no_extra_repositories.patch
changelog "Removed references to non-free software" changelog "Removed references to non-free software"
compile compile