每次開機都跳出「下載額外資料檔案失販 flashplugin-installer」 [論壇 - 新手村]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



每次開機都跳出「下載額外資料檔案失販 flashplugin-installer」
會員三級
註冊日期:
2008/9/16 22:00
所屬群組:
已註冊使用者
等級: 15
HP : 0 / 351
MP : 86 / 15449
EXP: 5
離線
ubuntu 16.04
每次開機進入桌面都跳出這個(如附件)求解

附件:



png  2017-06-15 06-01-20 的螢幕擷圖.png (48.91 KB)
12804_5941b4c90a9e9.png 548X426 px

2017/6/15 6:12
應用擴展 工具箱
回覆: 每次開機都跳出「下載額外資料檔案失敗 flashplugin-installer」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
我也有遇到相同的問題。

我其實也不曉得怎麼解決這個問題,
我個人是採取等待,等待下一次官方更新,
或是也可以「移除flashplugin-installer」然後「改採用另一個套件」。
(後記: 也可以參考下面回覆「#5」「#6」「#7」的分析)

不過提供一個我測試得到的訊息給您參考,若您有興趣深究的話。

我的環境是「Xubuntu 16.04 amd64 英文界面」。

執行


$ sudo apt-get install flashplugin-installer --reinstall




顯示



...略...

Get:1 http://tw.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 flashplugin-installer amd64 26.0.0.126ubuntu0.16.04.1 [6,834 B]
Fetched 6,834 B in 0s (109 kB/s)
Preconfiguring packages ...
(Reading database ... 546628 files and directories currently installed.)
Preparing to unpack .../flashplugin-installer_26.0.0.126ubuntu0.16.04.1_amd64.deb ...
Unpacking flashplugin-installer (26.0.0.126ubuntu0.16.04.1) over (26.0.0.126ubuntu0.16.04.1) ...
Processing triggers for update-notifier-common (3.168.4) ...
flashplugin-installer: processing...
flashplugin-installer: downloading http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20170613.2.orig.tar.gz
Err:1 http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20170613.2.orig.tar.gz
Could not open file /var/lib/update-notifier/package-data-downloads/partial/adobe-flashplugin_20170613.2.orig.tar.gz - open (40: Too many levels of symbolic links)
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/adobe-flashplugin_20170613.2.orig.tar.gz' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20170613.2.orig.tar.gz Could not open file /var/lib/update-notifier/package-data-downloads/partial/adobe-flashplugin_20170613.2.orig.tar.gz - open (40: Too many levels of symbolic links)

E: Download Failed
Setting up flashplugin-installer (26.0.0.126ubuntu0.16.04.1) ...





## 以前相關的討論


* 回覆: opera 36 如何安裝 adobe flash player
* 回覆: Browser Vivaldi stable_1.0.435.38-1 Release


===========================================================

若要探索「flashplugin-installer」這個套件的話,以下參考步驟


執行


$ apt-get download flashplugin-installer




會下載一個檔案「flashplugin-installer_26.0.0.126ubuntu0.16.04.1_amd64.deb」


然後執行下面指令解開「flashplugin-installer_26.0.0.126ubuntu0.16.04.1_amd64.deb」這個檔案


$ dpkg -x flashplugin-installer_26.0.0.126ubuntu0.16.04.1_amd64.deb flashplugin-installer



會解開到「flashplugin-installer」這個資料夾

然後執行指令,觀看「flashplugin-installer」這個資料夾結構


$ tree flashplugin-installer



顯示



flashplugin-installer
├── usr
│   ├── lib
│   │   ├── flashplugin-installer
│   │   │   └── install_plugin
│   │   ├── iceape
│   │   │   └── plugins
│   │   ├── iceweasel
│   │   │   └── plugins
│   │   ├── midbrowser
│   │   │   └── plugins
│   │   ├── mozilla
│   │   │   └── plugins
│   │   ├── xulrunner
│   │   │   └── plugins
│   │   └── xulrunner-addons
│   │       └── plugins
│   └── share
│       ├── doc
│       │   └── flashplugin-installer
│       │       ├── changelog.gz
│       │       └── copyright
│       ├── package-data-downloads
│       │   └── flashplugin-installer
│       └── ubufox
│           └── plugins
└── var
    ├── cache
    │   └── flashplugin-installer
    └── lib
        └── flashplugin-installer

26 directories, 4 files




關於「flashplugin-installer/usr/lib/flashplugin-installer/install_plugin」這個檔案,
安裝到系統的位置就是「/usr/lib/flashplugin-installer/install_plugin」。

關於「flashplugin-installer/usr/share/package-data-downloads/flashplugin-installer」這個檔案,
安裝到系統的位置就是「/usr/share/package-data-downloads/flashplugin-installer」。

執行下面指令,觀看「flashplugin-installer/usr/share/package-data-downloads/flashplugin-installer」的內容


$ cat flashplugin-installer/usr/share/package-data-downloads/flashplugin-installer



顯示


# XXX Note when updating to also update
# debian/flashplugin-installer.postinst and
# debian/flashplugin-installer.config
Url: http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20170613.2.orig.tar.gz
Sha256: 0c291e4bb2e245063b32c84da4d1d2dea00039f4e321ed341bd690974e11e9ea

Script: /usr/lib/flashplugin-installer/install_plugin



===========================================================

然後執行下面指令,解開「Control File」。


$ dpkg -e flashplugin-installer_26.0.0.126ubuntu0.16.04.1_amd64.deb



會得到一個資料夾「DEBIAN」

執行下面指令,觀看「DEBIAN」這個資料夾結構



$ tree DEBIAN



顯示


DEBIAN/
├── config
├── control
├── md5sums
├── postinst
├── postrm
├── prerm
└── templates

0 directories, 7 files




關於「DEBIAN/postinst」這個檔案,
安裝到系統的位置就是「/var/lib/dpkg/info/flashplugin-installer.postinst」。

這部份請參考「Debian Wiki / MaintainerScripts」。


若已經安裝「flashplugin-installer」這個套件了,也可執行下面指令


$ dpkg-query --control-path flashplugin-installer



顯示


/var/lib/dpkg/info/flashplugin-installer.postinst
/var/lib/dpkg/info/flashplugin-installer.config
/var/lib/dpkg/info/flashplugin-installer.prerm
/var/lib/dpkg/info/flashplugin-installer.postrm
/var/lib/dpkg/info/flashplugin-installer.md5sums
/var/lib/dpkg/info/flashplugin-installer.templates



執行


$ dpkg-query --control-list flashplugin-installer



顯示


postinst
config
prerm
postrm
md5sums
templates



執行下面指令


$ dpkg-query --control-show flashplugin-installer postinst



會顯示「/var/lib/dpkg/info/flashplugin-installer.postinst」的內容。

如同執行


$ less /var/lib/dpkg/info/flashplugin-installer.postinst




也可以執行


$ dpkg-query --control-path flashplugin-installer postinst



會顯示


/var/lib/dpkg/info/flashplugin-installer.postinst




===========================================================

## 相關的檔案路徑

* /var/lib/dpkg/info/flashplugin-installer.postinst
* /usr/share/package-data-downloads/flashplugin-installer
* /usr/lib/flashplugin-installer/install_plugin

===========================================================

## Debian Wiki

* MaintainerScripts
* DpkgTriggers

===========================================================

一些套件探索的討論案例連結,紀錄在「[索引] 套件操作實務」。

===========================================================

以上提供參考

報告完畢



2017/6/15 13:10
應用擴展 工具箱
回覆: 每次開機都跳出「下載額外資料檔案失販 flashplugin-installer」
會員三級
註冊日期:
2008/9/16 22:00
所屬群組:
已註冊使用者
等級: 15
HP : 0 / 351
MP : 86 / 15449
EXP: 5
離線
非常詳盡了
跪謝^ ^

2017/6/15 15:30
應用擴展 工具箱
回覆: 每次開機都跳出「下載額外資料檔案失敗 flashplugin-installer」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
剛剛做了點測試,紀錄下來提供額外參考

執行下面指令,建立資料夾「~/tmp/flash」


$ mkdir -p ~/tmp/flash




執行下面指令,切換到「~/tmp/flash」


$ cd ~/tmp/flash




===========================================================

執行下面指令,下載「http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20170613.2.orig.tar.gz」。



$ wget -c http://archive.canonical.com/pool/partner/a/adobe-flashplugin/adobe-flashplugin_20170613.2.orig.tar.gz



===========================================================

接下來有兩種方式,可以測試

## 測試一

因為看到有「/var/lib/dpkg/info/flashplugin-installer.templates」這個檔案,
所以聯想到可以執行「dpkg-reconfigure



$ sudo dpkg-reconfigure flashplugin-installer



然後輸入剛剛的路徑「/home/user/tmp/flash」<--請改成絕對路徑(user請改成自己的帳號)

按下「Tab」鍵,切換到「OK」,按下「Enter」確定執行。

就會顯示



Installing from local file /home/user/tmp/flash/adobe-flashplugin_20170613.2.orig.tar.gz
Installing from local file /home/user/tmp/flash/adobe-flashplugin_20170613.2.orig.tar.gz
Flash Plugin installed.
Flash Plugin installed.





然後再執行


$ ls /usr/lib/flashplugin-installer/libflashplayer.so -l



顯示


-rw-r--r-- 1 root root 16480480 Jun 15 15:26 /usr/lib/flashplugin-installer/libflashplayer.so



發現時間是有變動的

然後也可以執行


$ sudo debconf-show flashplugin-installer



顯示


* flashplugin-installer/not_exist:
flashplugin-installer/local: /home/user/tmp/flash



再執行一次


$ sudo dpkg-reconfigure flashplugin-installer



把剛剛輸入的路徑「/home/user/tmp/flash」給清空

按下「Tab」鍵,切換到「OK」,按下「Enter」確定執行。


再執行一次


$ sudo debconf-show flashplugin-installer



顯示


flashplugin-installer/local:
* flashplugin-installer/not_exist:




===========================================================

## 測試二


也可以直接執行下面的指令


$ sudo /usr/lib/flashplugin-installer/install_plugin /home/user/tmp/flash/adobe-flashplugin_20170613.2.orig.tar.gz



顯示


Installing from local file /home/user/tmp/flash/adobe-flashplugin_20170613.2.orig.tar.gz
Flash Plugin installed.




然後再執行


$ ls /usr/lib/flashplugin-installer/libflashplayer.so -l



顯示


-rw-r--r-- 1 root root 16480480 Jun 15 15:32 /usr/lib/flashplugin-installer/libflashplayer.so



發現時間是有變動的


===========================================================

從「/usr/lib/flashplugin-installer/install_plugin」
和「/var/lib/dpkg/info/flashplugin-installer.postinst」
可以看到有使用「update-alternatives」。

執行


$ grep update-alternatives /usr/lib/flashplugin-installer/install_plugin -n




顯示


31:update-alternatives --quiet --install "/usr/lib/mozilla/plugins/flashplugin-alternative.so" "mozilla-flashplugin" /usr/lib/flashplugin-installer/libflashplayer.so 50




執行


$ grep update-alternatives /var/lib/dpkg/info/flashplugin-installer.postinst -n



顯示


30: update-alternatives --quiet --remove "$p-flashplugin" /var/lib/flashplugin-installer/npwrapper.libflashplayer.so
55:# previous versions used update-alternatives --set to force a particular
59: update-alternatives --quiet --auto "mozilla-flashplugin"




===========================================================

執行


$ update-alternatives --query mozilla-flashplugin



顯示


Name: mozilla-flashplugin
Link: /usr/lib/mozilla/plugins/flashplugin-alternative.so
Status: auto
Best: /usr/lib/flashplugin-installer/libflashplayer.so
Value: /usr/lib/flashplugin-installer/libflashplayer.so

Alternative: /usr/lib/flashplugin-installer/libflashplayer.so
Priority: 50




執行


$ update-alternatives --display mozilla-flashplugin



顯示


mozilla-flashplugin - auto mode
link best version is /usr/lib/flashplugin-installer/libflashplayer.so
link currently points to /usr/lib/flashplugin-installer/libflashplayer.so
link mozilla-flashplugin is /usr/lib/mozilla/plugins/flashplugin-alternative.so
/usr/lib/flashplugin-installer/libflashplayer.so - priority 50




執行


$ update-alternatives --list mozilla-flashplugin




顯示


/usr/lib/flashplugin-installer/libflashplayer.so




執行


$ update-alternatives --config mozilla-flashplugin



顯示


There is only one alternative in link group mozilla-flashplugin (providing /usr/lib/mozilla/plugins/flashplugin-alternative.so): /usr/lib/flashplugin-installer/libflashplayer.so
Nothing to configure.




===========================================================

執行


$ file /usr/lib/mozilla/plugins/flashplugin-alternative.so



顯示


/usr/lib/mozilla/plugins/flashplugin-alternative.so: symbolic link to /etc/alternatives/mozilla-flashplugin




執行


$ file /etc/alternatives/mozilla-flashplugin



顯示


/etc/alternatives/mozilla-flashplugin: symbolic link to /usr/lib/flashplugin-installer/libflashplayer.so



===========================================================


## 相關檔案

* /etc/alternatives/mozilla-flashplugin
* /var/lib/dpkg/alternatives/mozilla-flashplugin



$ cat /var/lib/dpkg/alternatives/mozilla-flashplugin



顯示


auto
/usr/lib/mozilla/plugins/flashplugin-alternative.so

/usr/lib/flashplugin-installer/libflashplayer.so
50




===========================================================

## Debian Wiki

* DebianAlternatives
* FlashPlayer


## Debian Reference

* 2.5.10. The update-alternatives command

===========================================================

## Package

* debconf
* debconf-doc
* debian-policy

## Manpage

$ man confmodule
$ man debconf-devel
$ man 7 debconf
$ man debconf
$ man debconf-show
$ man dpkg-reconfigure

## 相關路徑

* /usr/share/debconf/confmodule
* /usr/share/doc/debian-policy/debconf_specification.txt.gz


===========================================================

以上提供參考


2017/6/15 15:50
應用擴展 工具箱
回覆: 每次開機都跳出「下載額外資料檔案失敗 flashplugin-installer」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
從上面「回覆#2」一開始提到的訊息,其中有一行


samwhelp 寫到:
Processing triggers for update-notifier-common (3.168.4) ...




可以研究「update-notifier-common」這個套件提供的機制,

主要是研究跟「DpkgTriggers」這個相關的議題,
還有「/usr/share/package-data-downloads」的用途。

執行


$ dpkg-query --control-path update-notifier-common




顯示


/var/lib/dpkg/info/update-notifier-common.postinst
/var/lib/dpkg/info/update-notifier-common.triggers
/var/lib/dpkg/info/update-notifier-common.md5sums
/var/lib/dpkg/info/update-notifier-common.preinst
/var/lib/dpkg/info/update-notifier-common.postrm



可以看到有「/var/lib/dpkg/info/update-notifier-common.triggers」這個檔案

可以執行下面指令觀看「/var/lib/dpkg/info/update-notifier-common.triggers」這個檔案的內容。


$ dpkg-query --control-show update-notifier-common triggers




等同執行下面的指令


$ less /var/lib/dpkg/info/update-notifier-common.triggers



會顯示


interest /usr/share/package-data-downloads



以下我目前理解到的流程,

當安裝一個新的套件時,並且在「/usr/share/package-data-downloads」有放置檔案時,

則會觸發執行「/var/lib/dpkg/info/update-notifier-common.postinst」這個「MaintainerScripts」。

然後觀看「/var/lib/dpkg/info/update-notifier-common.postinst」這個檔案的內容。

可以看到其中會執行「/usr/lib/update-notifier/package-data-downloader」。

所以可以研究「/usr/lib/update-notifier/package-data-downloader」裡面的內容,來瞭解相關的機制。

我有做了一個簡單的套件打包範例放在「GitHub」上,

該套件會安裝一個檔案「/usr/share/package-data-downloads/demo」,

來粗略模擬「/usr/share/package-data-downloads/flashplugin-installer」下載的流程,

根據「/usr/share/package-data-downloads/demo」內容的設定,

會下載「https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt」。

下載完畢後,就會執行「/usr/bin/demo」這個「Shell script」。

這個「Shell Scirpt」,會將「/var/lib/update-notifier/package-data-downloads/partial/demo.txt」這個檔案,
複製到「/tmp/demo.txt」,並且dump內容。



除了「flashplugin-installer」這個套件,
另外還有一個套件「ttf-mscorefonts-installer」也有採用「/usr/share/package-data-downloads」的機制。




================================================================================

執行


$ file /usr/lib/update-notifier/package-data-downloader



顯示


/usr/lib/update-notifier/package-data-downloader: Python script, ASCII text executable




執行


$ grep '/usr/lib/apt/apt-helper' /usr/lib/update-notifier/package-data-downloader -A 1 -B 1 -n



顯示


179-    ret = subprocess.call(
180:        ["/usr/lib/apt/apt-helper",
181-         "download-file", uri, dest_file, "SHA256:" + sha256_hashsum])




可以看到「/usr/lib/update-notifier/package-data-downloader」這個「Python script」,有呼叫一個外部指令「/usr/lib/apt/apt-helper

直接執行


$ /usr/lib/apt/apt-helper



顯示


apt 1.2.20 (amd64)
Usage: apt-helper [options] command
       apt-helper [options] cat-file file ...
       apt-helper [options] download-file uri target-path

apt-helper bundles a variety of commands for shell scripts to use
e.g. the same proxy configuration or acquire system as APT would.

Most used commands:
  download-file - download the given uri to the target-path
  srv-lookup - lookup a SRV record (e.g. _http._tcp.ftp.debian.org)
  cat-file - concatenate files, with automatic decompression
  auto-detect-proxy - detect proxy using apt.conf


Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
                                This APT helper has Super Meep Powers.




我有簡單製做了一個「範例檔案」,放在「GitHub」上,供下載測試用。

所以透過「/usr/lib/apt/apt-helper」,可以執行如下的指令來下載


$ /usr/lib/apt/apt-helper download-file https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt /tmp/demo.txt



或是執行


$ /usr/lib/apt/apt-helper download-file https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt /tmp/demo.txt SHA256:0f0af810c640b514ea0cc792ac03611b978928465d9cd43b607d236848969c7f



正常下載就會顯示


Get:1 https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt [45 B]
Fetched 45 B in 0s (92 B/s)



根據上面的指令指定的,下載的路徑放在「/tmp/demo.txt」。

================================================================================

也可以測試錯誤的狀況,將「/tmp/demo.txt」改成 「/tmp/」。


$ /usr/lib/apt/apt-helper download-file https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt /tmp/



顯示


Get:1 https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt [45 B]
Err:1 https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt
Could not open file /tmp/ - open (21: Is a directory)
W: Problem unlinking the file /tmp/ - PrepareFiles (21: Is a directory)
E: Failed to fetch https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt Could not open file /tmp/ - open (21: Is a directory)

E: Download Failed



類似上面「回覆#2」的提示訊息 (不過狀況應該是不一樣的,只是舉例說明)


執行下面指令,測試下載網址不存在的狀況。


$ /usr/lib/apt/apt-helper download-file https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo1.txt /tmp/demo.txt



顯示


Err:1 https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo1.txt
404 Not Found
E: Failed to fetch https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo1.txt 404 Not Found

E: Download Failed



================================================================================

## Debian Wiki

* DpkgTriggers


## 相關連結

* Draft spec for new dpkg "triggers" feature
* dpkg: How to use trigger?
* dpkg triggers, the lost how-to document


## Manpage

$ man deb-triggers
$ man dpkg-trigger

## Spec

$ less /usr/share/doc/dpkg-dev/triggers.txt.gz

## Example

$ firefox https://anonscm.debian.org/cgit/users/seanius/dpkg-triggers-example.git

$ git clone git://anonscm.debian.org/users/seanius/dpkg-triggers-example.git
$ git clone https://anonscm.debian.org/git/users/seanius/dpkg-triggers-example.git



================================================================================

執行


$ apt-get source update-notifier



執行


$ grep '下載額外資料檔案失敗' update-notifier-3.168.4/* -R -n



顯示


update-notifier-3.168.4/po/zh_HK.po:345:msgstr "下載額外資料檔案失敗"
update-notifier-3.168.4/po/zh_TW.po:345:msgstr "下載額外資料檔案失敗"



================================================================================



以上補充

報告完畢


2017/6/17 17:34
應用擴展 工具箱
回覆: 每次開機都跳出「下載額外資料檔案失敗 flashplugin-installer」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
可以嘗試將上面「回覆 #5]」提到的範例

把「/demo/usr/share/package-data-downloads/demo」修改,
可以把「Sha256:...」那刻意寫錯,

也就是把


Sha256: 0f0af810c640b514ea0cc792ac03611b978928465d9cd43b607d236848969c7f



改成(後面多加一個「z」,來測試)


Sha256: 0f0af810c640b514ea0cc792ac03611b978928465d9cd43b607d236848969c7fz


然後重新打包安裝,

就會顯示下面的訊息。


(Reading database ... 516468 files and directories currently installed.)
Preparing to unpack demo.deb ...
Unpacking demo (0.1) over (0.1) ...
Setting up demo (0.1) ...
Processing triggers for update-notifier-common (3.168.4) ...
demo: processing...
demo: downloading https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt
Get:1 https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt [45 B]
Err:1 https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt
Hash Sum mismatch
Fetched 45 B in 0s (77 B/s)
W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/demo.txt' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt Hash Sum mismatch

E: Download Failed




然後觀察到會有下面幾個檔案產生

* /var/lib/update-notifier/user.d/data-downloads-failed
* /usr/share/package-data-downloads/demo
* /var/lib/update-notifier/package-data-downloads/demo.failed
* /var/lib/update-notifier/package-data-downloads/partial/demo.txt.FAILED



執行


$ cat /usr/share/package-data-downloads/demo



顯示



Url: https://raw.githubusercontent.com/samwhelp/demo-about-debian-package/master/download/demo.txt
Sha256: 0f0af810c640b514ea0cc792ac03611b978928465d9cd43b607d236848969c7fz

Script: /usr/bin/demo





Priority: High
Name: Failure to download extra data files
...略...
Name-zh_TW.UTF-8: 下載額外資料檔案失敗
Terminal: True
Command: pkexec /usr/lib/update-notifier/package-data-downloader
Description:
The following packages requested additional data downloads after package
installation, but the data could not be downloaded or could not be
processed.
.
.
demo
.
.
The download will be attempted again later, or you can try the download
again now. Running this command requires an active Internet connection.
...略...
Description-zh_TW.UTF-8:
以下的套件要求在安裝時下載額外資料,但資料無法下載或進入程序。
.
.
demo
.
.
之後將會再次嘗試下載,或者您現在可以再次嘗試下載。執行這個指令需要有一個有效的網路連線。



================================================================================

若要再度呼叫提示的對話框,只要執行下面兩行,然後等待一會兒,就會再度出現


$ sudo touch /var/lib/update-notifier/user.d/data-downloads-failed




如何發現上面這個方法,可以參考


apt-get source update-notifier
cat update-notifier-3.168.4/README.testing



可以看到其中有一段


Test hooks:
Copy a example hook file into /usr/lib/update-notifier/user.d/ (or
touch it) and touch /var/lib/update-notifier/dpkg-run-stamp to trigger
it reading the hooks. Modify ~/.update-notifier/hooks_seen to
simulate certain conditions. Add identical files to "user.d" to test
the duplicates detection.



上面「/usr/lib/update-notifier/user.d/
要改成「/var/lib/update-notifier/user.d/」。


而「~/.update-notifier/hooks_seen
要改成~/.config/update-notifier/hooks_seen


另外「/var/lib/update-notifier/dpkg-run-stamp」這個路徑,
也可以從「/etc/apt/apt.conf.d/99update-notifier」找到。


$ sudo touch /var/lib/update-notifier/dpkg-run-stamp



================================================================================

執行下面指令,可以預覽跳出對話框的原型


$ glade-previewer --filename /usr/share/update-notifier/ui/hooks-dialog.ui



或是


$ glade /usr/share/update-notifier/ui/hooks-dialog.ui



================================================================================

## 以下一些相關的路徑紀錄

* /var/lib/update-notifier/user.d/data-downloads-failed
* /usr/share/update-notifier/package-data-downloads-failed
* /usr/share/update-notifier/package-data-downloads-failed-permanently


* /etc/xdg/autostart/update-notifier.desktop
* /usr/share/update-notifier/ui/hooks-dialog.ui

* /etc/cron.daily/update-notifier-common
* /usr/lib/update-notifier/package-data-downloader


* /usr/share/package-data-downloads/demo
* /var/lib/update-notifier/package-data-downloads/demo.failed
* /var/lib/update-notifier/package-data-downloads/partial/demo.txt.FAILED


* ~/.config/update-notifier/hooks_seen
* /etc/update-notifier/hooks_seen

================================================================================

## 額外一提

從「/usr/lib/update-notifier/update-motd-updates-available」

看到一個指令「/usr/lib/update-notifier/apt-check --human-readable」。

執行


$ /usr/lib/update-notifier/apt-check --human-readable



顯示


0 packages can be updated.
0 updates are security updates.



執行


$ file /usr/lib/update-notifier/apt-check



顯示


/usr/lib/update-notifier/apt-check: symbolic link to apt_check.py



執行


$ file /usr/lib/update-notifier/apt_check.py



顯示


/usr/lib/update-notifier/apt_check.py: Python script, ASCII text executable




執行


$ /usr/lib/update-notifier/apt-check --help



顯示


Usage: apt-check [options]

Options:
-h, --help show this help message and exit
-p, --package-names Show the packages that are going to be
installed/upgraded
--human-readable Show human readable output on stdout
--security-updates-unattended
Return the time in days when security updates are
installed unattended (0 means disabled)




所以可以執行


$ /usr/lib/update-notifier/apt-check -p



或是執行

$ /usr/lib/update-notifier/apt-check --package-names



可以得到一個套件列表



================================================================================

以上提供參考

報告完畢


2017/6/20 16:24
應用擴展 工具箱
回覆: 每次開機都跳出「下載額外資料檔案失敗 flashplugin-installer」
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 37
HP : 0 / 905
MP : 679 / 30311
EXP: 23
離線
延續上面的「回覆 #6」,接下來可以做幾個測試

================================================================================

## 測試一


執行下面指令


$ sudo vi /var/lib/update-notifier/user.d/test-update-notifier



然後填入下面的內容


Priority: High
Name: test update-notifier
Name-zh_TW.UTF-8: 測試 update-notifier
Description: This is test
 for update-notifier
Description-zh_TW.UTF-8: 這是
 用來測試 update-notifier




存檔後,大概經過170秒,就會跳出一個對話框。(延遲秒數我不是很確定,請耐心等待)



-----------------------------------
Information available
-----------------------------------
Update information
-----------------------------------
test update-notifier

This is test for update-notifier
-----------------------------------



若沒有跳出對話框,或是要讓對話框再次出現

可以執行下面指令


$ sudo touch /var/lib/update-notifier/user.d/test-update-notifier



對話框不會立即出現,大概需要等待170秒。

================================================================================

## 測試二

接下來做另一個測試

執行下面指令


$ sudo vi /usr/bin/demo-update-notifier-callback



然後填入下面內容


#!/usr/bin/env bash

echo
echo '========================='
echo "from update-notifier"
echo '========================='
echo

sleep 1m



存檔後,執行下面指令,設定可執行


$ sudo chmod +x /usr/bin/demo-update-notifier-callback



先執行下面指令測試


$ /usr/bin/demo-update-notifier-callback



會顯示


=========================
from update-notifier
=========================



會經過一分鐘後,才會跳出另一個提示字元,可以直接按下「ctrl+c」。



再來執行下面指令,修改剛剛產生的「/var/lib/update-notifier/user.d/test-update-notifier


$ sudo vi /var/lib/update-notifier/user.d/test-update-notifier



加入下面兩行


Terminal: True
Command: /usr/bin/demo-update-notifier-callback



也就最後的內容如下


Priority: High
Terminal: True
Command: /usr/bin/demo-update-notifier-callback
Name: test update-notifier
Name-zh_TW.UTF-8: 測試 update-notifier
Description: This is test
 for update-notifier
Description-zh_TW.UTF-8: 這是一個
 用來測試 update-notifier




存檔後,大概經過170秒,就會跳出一個對話框。


-----------------------------------
Information available
-----------------------------------
Update information
-----------------------------------
test update-notifier

This is test for update-notifier
-----------------------------------
[ Run this action now ]



然後可以按下「Run this action now」那個按鈕,
就會開啟一個「Terminal」,並且執行「/usr/bin/demo-update-notifier-callback」。
也就是跟據上面「/var/lib/update-notifier/user.d/test-update-notifier」,
的設定「Command: /usr/bin/demo-update-notifier-callback」。

================================================================================


另外有一個檔案「~/.config/update-notifier/hooks_seen


$ cat ~/.config/update-notifier/hooks_seen



顯示


incomplete-language-support-gnome.note 1461428458 0
apt-file-update 1463936233 0
data-downloads-failed 1497933549 1
test-update-notifier 1497943606 1



================================================================================

執行下面指令,下載「update-notifier」的「Source Package


$ apt-get source update-notifier




$ cd update-notifier-3.168.4/

然後可以參考一些檔案的內容

* README
* README.testing
* HOOKS
* src/hooks.c
* src/update-notifier.c
* src/update.c


================================================================================


以上提供參考

報告完畢


2017/6/20 16:40
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.