收視率,目前主導台灣電視台產業的奇怪數字。建議大家讀一下這兩篇文章。
關於收視率
http://www.wretch.cc/blog/deardale&article_id=2185523
我們的社會優劣,取決於小數點後面的數字
http://www.wretch.cc/blog/deardale&article_id=3390613
2006年11月3日 星期五
debpatch 0.99.10
[lang_zh]
這幾天幫 debpatch 加了新功能 :D
debpatch 舊的功能是自動幫 package 加 patch 然後重新 dpkg-buildpackage 出新的 deb。你所需要做的事是把你的 patch 丟到 /etc/debpatch/PACKAGE.d/ 底下。甚至 patch 之前,還可以 prepatch (PACKAGE.prepatch) 他(例如說在 debian/rules 裡面加一行
但是如果今天要 patch 的 package 是 locales 的一個檔案(我有這個需求,因為要改 UTF-8.gz),就得把「整個」glibc 重編... 所以我這兩天幫 debpatch 加上新功能,來「取代」package 裡的檔案。
所以現在我要做的事情就變成把我的 UTF-8.gz 丟到 /etc/debpatch/locales.d/data/usr/share/i18n/charmaps/UTF-8.gz 然後 build 就行了 :D (注意那個 data 目錄,概念上可以當成是 install 時的根目錄)
[/lang_zh]
[lang_en]
I add a new feature to debpatch :)
debpatch is a application to help you patch package in a easy manner, it'll like to put your patch in to /etc/debpatch/PACKAGE.d/ or prepatch with /etc/debpatch/PACKAGE.prepatch .
But when I wanted to patch a file like /usr/share/i18n/charmaps/UTF-8.gz , I had to rebuild the whole glibc package"s", which are a big job. So I added a new feature to replace files during these few days.
So what I have to do now is to put my own UTF-8.gz into /etc/debpatch/locales.d/data/usr/share/i18n/charmaps/UTF-8.gz and rebuild. That's it. (Note the "data" directory. Conceptually it can be regarded as the root directory when you install that package)
[/lang_en]
這幾天幫 debpatch 加了新功能 :D
debpatch 舊的功能是自動幫 package 加 patch 然後重新 dpkg-buildpackage 出新的 deb。你所需要做的事是把你的 patch 丟到 /etc/debpatch/PACKAGE.d/ 底下。甚至 patch 之前,還可以 prepatch (PACKAGE.prepatch) 他(例如說在 debian/rules 裡面加一行
include /usr/share/cdbs/1/rules/simple-patchsys.mk但是如果今天要 patch 的 package 是 locales 的一個檔案(我有這個需求,因為要改 UTF-8.gz),就得把「整個」glibc 重編... 所以我這兩天幫 debpatch 加上新功能,來「取代」package 裡的檔案。
所以現在我要做的事情就變成把我的 UTF-8.gz 丟到 /etc/debpatch/locales.d/data/usr/share/i18n/charmaps/UTF-8.gz 然後 build 就行了 :D (注意那個 data 目錄,概念上可以當成是 install 時的根目錄)
[/lang_zh]
[lang_en]
I add a new feature to debpatch :)
debpatch is a application to help you patch package in a easy manner, it'll like to put your patch in to /etc/debpatch/PACKAGE.d/ or prepatch with /etc/debpatch/PACKAGE.prepatch .
But when I wanted to patch a file like /usr/share/i18n/charmaps/UTF-8.gz , I had to rebuild the whole glibc package"s", which are a big job. So I added a new feature to replace files during these few days.
So what I have to do now is to put my own UTF-8.gz into /etc/debpatch/locales.d/data/usr/share/i18n/charmaps/UTF-8.gz and rebuild. That's it. (Note the "data" directory. Conceptually it can be regarded as the root directory when you install that package)
[/lang_en]
2006年11月1日 星期三
ar / dpkg-deb
[lang_zh]
昨天我提過的問題我在一個討論串中找到答案了。
ar 有不同的版本,例如 SVr4/GNU 的 ar 包成 archive 時,檔名是以 '/' 當作結尾,而 BSD 的 ar 不是。dpkg 用的是 BSD 的格式(而不是 GNU? XD),所以當我在 Debian 上用 GNU 的 ar 做 deb 時,檔名是用 '/' 結尾。而 apt-get 抓下來安裝時,卻發現檔名多了 '/',這不是他喜歡的樣子。
新的 dpkg 應該是同時 support 兩種格式的,但是我測試的 package (in fact, it's locales) 裡面的 debian-binary 是 2.0 (舊版)。不過.. dpkg tools 好像還是沒支援對 deb 寫入的功能 :(
暫時先不理他好了,反正這是 harmless ..
[/lang_zh]
[lang_en]
My problem is located in this discussion
There are different versions of ar. SVr4/GNU's ar packs archive with filename delimited by '/', but BSD's doesn't. dpkg(1) uses BSD's ar format (instead of GNU? XD). So what I built my deb with GNU ar, filenames are end with '/'. When apt-get is trying to install it, it found the filename is not what it expects.
New dpkg supposes to support both format, but the package I'm working on (in fact, it's locales) says it's debian-binary is 2.0, which is old. Anyway, it seems that dpkg tools doesn't support writing to deb until now.
Well, I guess I could ignore it since it's harmless..
[/lang_en]
昨天我提過的問題我在一個討論串中找到答案了。
ar 有不同的版本,例如 SVr4/GNU 的 ar 包成 archive 時,檔名是以 '/' 當作結尾,而 BSD 的 ar 不是。dpkg 用的是 BSD 的格式(而不是 GNU? XD),所以當我在 Debian 上用 GNU 的 ar 做 deb 時,檔名是用 '/' 結尾。而 apt-get 抓下來安裝時,卻發現檔名多了 '/',這不是他喜歡的樣子。
新的 dpkg 應該是同時 support 兩種格式的,但是我測試的 package (in fact, it's locales) 裡面的 debian-binary 是 2.0 (舊版)。不過.. dpkg tools 好像還是沒支援對 deb 寫入的功能 :(
暫時先不理他好了,反正這是 harmless ..
[/lang_zh]
[lang_en]
My problem is located in this discussion
There are different versions of ar. SVr4/GNU's ar packs archive with filename delimited by '/', but BSD's doesn't. dpkg(1) uses BSD's ar format (instead of GNU? XD). So what I built my deb with GNU ar, filenames are end with '/'. When apt-get is trying to install it, it found the filename is not what it expects.
New dpkg supposes to support both format, but the package I'm working on (in fact, it's locales) says it's debian-binary is 2.0, which is old. Anyway, it seems that dpkg tools doesn't support writing to deb until now.
Well, I guess I could ignore it since it's harmless..
[/lang_en]
2006年10月31日 星期二
not a valid DEB package
[lang_zh]
今天在用 ar 取代 .deb 裡面的 control.tar.gz 跟 data.tar.gz 時(關於 ar 跟 deb,請見我之前提過的這篇,發現做出來的 deb 會讓 apt-get install 叫 "not a valid DEB package"。雖然只是 warning,不過看了很不爽。
經過這篇 Creating Debian Packages 的提示,發現要用 dpkg-deb 做才不會有這個 warning。於是我好奇地拿兩個方法做出來的 deb 解開看,內容(包括 data 跟 control)完全一模一樣。但 dinary diff 之後的確有一小段差異,不知道是不是什麼 comment @@
不過.. 我要寫的東西只是將 package 裡面的少數幾個檔案換掉。所以用 ar 來做,所需的步驟大概是:
但是用 dpkg-deb 的話,就必須把整個 data.tar.gz 「全解開」,丟我的檔案進去,tgz 起來... 有時間再來看看那段疑似 comment/signature 的東西是什麼 @@
[/lang_zh]
[lang_en]
I was trying to "replace" control.tar.gz and data.tar.gz in a .deb package using ar(1) command. Yes it works, but the new package make apt-get cry "not a valid DEB package." Although it's just a warning, it makes me feel bad.
I searched this problem with google and found Creating Debian Packages. It said you have to use dpkg-deb(1) to build .deb to free the warning. Curiously, I checked the two .deb (generated by ar and dpkg-deb) by extracting the package, but they were all the same. Then I took a look at the binary diff of these two, they really had some bytes of different. I don't know if they were comment or so.
Actually, what I want to do is to replace a few files in a deb package. Do it with ar(1), I only need to:
However, with dpkg-deb(1), I have to extract the whole data.tar.gz, putting my file in, and then re-tgz it, which is very bad. I'll try to figure what the magic bytes is later.
[/lang_en]
今天在用 ar 取代 .deb 裡面的 control.tar.gz 跟 data.tar.gz 時(關於 ar 跟 deb,請見我之前提過的這篇,發現做出來的 deb 會讓 apt-get install 叫 "not a valid DEB package"。雖然只是 warning,不過看了很不爽。
經過這篇 Creating Debian Packages 的提示,發現要用 dpkg-deb 做才不會有這個 warning。於是我好奇地拿兩個方法做出來的 deb 解開看,內容(包括 data 跟 control)完全一模一樣。但 dinary diff 之後的確有一小段差異,不知道是不是什麼 comment @@
不過.. 我要寫的東西只是將 package 裡面的少數幾個檔案換掉。所以用 ar 來做,所需的步驟大概是:
- ar x 解開
- gunzip data.tar.gz
- tar uf data.tar my_file
- gzip data.tar
- ar r data.tar.gz
但是用 dpkg-deb 的話,就必須把整個 data.tar.gz 「全解開」,丟我的檔案進去,tgz 起來... 有時間再來看看那段疑似 comment/signature 的東西是什麼 @@
[/lang_zh]
[lang_en]
I was trying to "replace" control.tar.gz and data.tar.gz in a .deb package using ar(1) command. Yes it works, but the new package make apt-get cry "not a valid DEB package." Although it's just a warning, it makes me feel bad.
I searched this problem with google and found Creating Debian Packages. It said you have to use dpkg-deb(1) to build .deb to free the warning. Curiously, I checked the two .deb (generated by ar and dpkg-deb) by extracting the package, but they were all the same. Then I took a look at the binary diff of these two, they really had some bytes of different. I don't know if they were comment or so.
Actually, what I want to do is to replace a few files in a deb package. Do it with ar(1), I only need to:
- ar x to extract
- gunzip data.tar.gz
- tar uf data.tar my_file
- gzip data.tar
- ar r data.tar.gz
However, with dpkg-deb(1), I have to extract the whole data.tar.gz, putting my file in, and then re-tgz it, which is very bad. I'll try to figure what the magic bytes is later.
[/lang_en]
2006年10月24日 星期二
2006年9月24日 星期日
守備數據書
昨天看到 Debugger 從美國帶回來的一堆數據書,其中有一本統計 2003-2005 全 MLB 守備的書很有趣。基本上他的概念就是 Money Ball 上提到的那樣,把球場分區、統計全聯盟平均在每一區能守下多少百分比的球,再拿每一個球員、每一隊守過某區域的球員,計算他(們)守下多少球、再跟聯盟平均相比。
書上的 abstract (還是 introduction) 一開始就挑了每個位置得過金手套,但是統計結果卻很慘的球員,例如 Mike Lowell, Derek Jeter, Bobby Abreu, etc. 有些球員還滿意外的。
有幾頁是一個球場的圖,每一隊一張圖。圖中顯示每一隊在每一區的守備水準,高於平均用藍色顯示、低於平均用紅色、差不多在平均左右的就用白色 (應該是切三等分,至少白色的 range 不是太小)。結果 NYY 的守備一片紅 Orz
全聯盟每個守位的球員,也有拿來一起比。書後面還有對每一個人,有一段簡短的評價,寫得很狠,例如 Johnny Damon 那段的最後一句..
Orz
NYY 幾乎每個人都排倒數 3 名內。當然,拿打擊成績一起來看的話,他們的貢獻度應該還是高於平均之上的。
所以... Wang 不知道被多打了多少安打,當然他也得到了非常多來自隊友的支持。說到這個,當時有人提到另一個投手,叫 Roger Clemens... XD
書上的 abstract (還是 introduction) 一開始就挑了每個位置得過金手套,但是統計結果卻很慘的球員,例如 Mike Lowell, Derek Jeter, Bobby Abreu, etc. 有些球員還滿意外的。
有幾頁是一個球場的圖,每一隊一張圖。圖中顯示每一隊在每一區的守備水準,高於平均用藍色顯示、低於平均用紅色、差不多在平均左右的就用白色 (應該是切三等分,至少白色的 range 不是太小)。結果 NYY 的守備一片紅 Orz
全聯盟每個守位的球員,也有拿來一起比。書後面還有對每一個人,有一段簡短的評價,寫得很狠,例如 Johnny Damon 那段的最後一句..
His arm, however, is a joke.
Orz
NYY 幾乎每個人都排倒數 3 名內。當然,拿打擊成績一起來看的話,他們的貢獻度應該還是高於平均之上的。
所以... Wang 不知道被多打了多少安打,當然他也得到了非常多來自隊友的支持。說到這個,當時有人提到另一個投手,叫 Roger Clemens... XD
2006年9月6日 星期三
RSS Feed Changed
之前改過 Bloxsom 後,沒有注意到我舊的 RSS 不能用了 ... 如果您有訂閱的話,麻煩把 feed url 改成 http://victor.csie.org/blog/index.rss 。舊的目前是可以用了,但是過一陣子我可能會拿掉 :)
訂閱:
文章 (Atom)