Why does kickstart %post script calling yum api to update spams logs with package download messages?
Issue
- During the
%postsegment of Kickstart, there is a python scripting used to update the system through theyumapi. - The working piece:
yb = yum.YumBase()
yb.setCacheDir()
yb.preconf.errorlevel = 0
yb.preconf.errorlevel = 0
yb.conf.assumeyes = True
yb.doLock()
yb.update()
yb.resolveDeps()
yb.buildTransaction()
yb.processTransaction()
yb.doUnlock()
- This works however it spams the
ks-post.log.2with tens of thousands of lines like the following:
Updating: libgcc-4.8.5-4.el7.x86_64 0/180604 [1/755]
Updating: libgcc-4.8.5-4.el7.x86_64 65684/180604 [1/755]
Updating: libgcc-4.8.5-4.el7.x86_64 88868/180604 [1/755]
Updating: libgcc-4.8.5-4.el7.x86_64 89028/180604 [1/755]
Updating: libgcc-4.8.5-4.el7.x86_64 89168/180604 [1/755]
Updating: libgcc-4.8.5-4.el7.x86_64 107318/180604 [1/755]
Updating: libgcc-4.8.5-4.el7.x86_64 133912/180604 [1/755]
- How do one tell the
apito suppress this output?
Environment
- Red Hat Enterprise Linux 7.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.